const fs = require('fs')
const path = require('path')
const fsExtra = require('fs-extra')

const fileList = ['./package.json', './README.md']
const outDir = path.resolve(__dirname, '../dist')

const copyFile = async () => {
  for (const file of fileList) {
    const fileStr = await fs.readFileSync(path.resolve(__dirname, file))
    fsExtra.outputFile(path.resolve(outDir, file), fileStr, 'utf-8')
  }
}

copyFile()
